gtk: Remove unneeded gtk_snapshot_push()/pop() calls
authorBenjamin Otte <otte@redhat.com>
Fri, 9 Dec 2016 20:38:35 +0000 (21:38 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 9 Dec 2016 20:39:43 +0000 (21:39 +0100)
gtk/gtkaccellabel.c
gtk/gtkcontainer.c
gtk/gtkcssgadget.c
gtk/gtkwidget.c
gtk/gtkwindow.c

index 2f423cb9aed0456d7c6befd0474a676c501ea2a5..6dde7452c17d79c74c4d4b7bd9b1aabd9d09a60f 100644 (file)
@@ -464,16 +464,8 @@ gtk_accel_label_snapshot (GtkWidget   *widget,
 {
   GtkAccelLabel *accel_label = GTK_ACCEL_LABEL (widget);
   guint ac_width;
-  GtkAllocation allocation, clip;
+  GtkAllocation allocation;
   GtkRequisition requisition;
-  graphene_rect_t bounds;
-
-  gtk_widget_get_clip (widget, &clip);
-  gtk_widget_get_allocation (widget, &allocation);
-  graphene_rect_init (&bounds,
-                      clip.x - allocation.x, clip.y - allocation.y,
-                      clip.width, clip.height);
-  gtk_snapshot_push (snapshot, &bounds, "AccelLabel");
 
   GTK_WIDGET_CLASS (gtk_accel_label_parent_class)->snapshot (widget, snapshot);
 
@@ -508,8 +500,6 @@ gtk_accel_label_snapshot (GtkWidget   *widget,
 
       g_object_unref (accel_layout);
     }
-
-  gtk_snapshot_pop (snapshot);
 }
 
 static void
index 928d95ecf694aac024552f584cc817e8abc9089f..7db677a94241fc73dd9f8764f873a32d4a2b31f2 100644 (file)
@@ -3095,21 +3095,10 @@ gtk_container_snapshot (GtkWidget   *widget,
                         GtkSnapshot *snapshot)
 {
   GtkContainer *container = GTK_CONTAINER (widget);
-  GtkAllocation allocation, clip;
-  graphene_rect_t bounds;
-
-  gtk_widget_get_clip (widget, &clip);
-  gtk_widget_get_allocation (widget, &allocation);
-  graphene_rect_init (&bounds,
-                      clip.x - allocation.x, clip.y - allocation.y,
-                      clip.width, clip.height);
-  gtk_snapshot_push (snapshot, &bounds, "Children<%s>", G_OBJECT_TYPE_NAME (container));
 
   gtk_container_forall (container,
                         gtk_container_snapshot_forall,
                         snapshot);
-
-  gtk_snapshot_pop (snapshot);
 }
 
 static void
index 85a2d7fa211972e5e9873d6be96d2e8a689ae123..ce6e8d770998be83b3ded85e07ff1e71ce3da359 100644 (file)
@@ -1033,8 +1033,6 @@ gtk_css_gadget_snapshot (GtkCssGadget *gadget,
   get_box_border (style, &border);
   get_box_padding (style, &padding);
 
-  gtk_snapshot_push (snapshot, &bounds, "%s<%s>", gtk_css_node_get_name (priv->node), G_OBJECT_TYPE_NAME (priv->owner));
-
   gtk_snapshot_translate_2d (snapshot, x + margin.left, y + margin.top);
   gtk_css_style_snapshot_background (style,
                                      snapshot,
@@ -1068,8 +1066,6 @@ gtk_css_gadget_snapshot (GtkCssGadget *gadget,
                                       height - margin.top - margin.bottom);
       gtk_snapshot_translate_2d (snapshot, - x - margin.left, - y - margin.top);
   }
-
-  gtk_snapshot_pop (snapshot);
 }
 
 void
index 162d67ae0c99ec384c5c26f359b23294f655ca8e..b9466dc73476e2aef64ea8c8f891a961e317139f 100644 (file)
@@ -15582,8 +15582,6 @@ gtk_widget_snapshot (GtkWidget   *widget,
           gboolean result;
           cairo_t *cr;
 
-          gtk_snapshot_push (snapshot, &bounds, "DrawSignal<%s>", G_OBJECT_TYPE_NAME (widget));
-
           klass->snapshot (widget, snapshot);
 
           cr = gtk_snapshot_append_cairo_node (snapshot, 
@@ -15591,8 +15589,6 @@ gtk_widget_snapshot (GtkWidget   *widget,
                                                "DrawSignalContents<%s>", G_OBJECT_TYPE_NAME (widget));
           g_signal_emit (widget, widget_signals[DRAW], 0, cr, &result);
           cairo_destroy (cr);
-
-          gtk_snapshot_pop (snapshot);
         }
       else
         {
index 0e9678ee21f2724e2216f401e45e6ce57fd62b4c..c6600c2574005c3ede64ea0afb3ac68d166f3b93 100644 (file)
@@ -9392,7 +9392,6 @@ gtk_window_snapshot (GtkWidget   *widget,
   GtkAllocation allocation;
   GtkBorder window_border;
   gint title_height;
-  graphene_rect_t bounds;
   GList *l;
 
   context = gtk_widget_get_style_context (widget);
@@ -9400,10 +9399,6 @@ gtk_window_snapshot (GtkWidget   *widget,
   get_shadow_width (GTK_WINDOW (widget), &window_border);
   _gtk_widget_get_allocation (widget, &allocation);
 
-  graphene_rect_init (&bounds, allocation.x, allocation.y, allocation.width, allocation.height);
-
-  gtk_snapshot_push (snapshot, &bounds, "Window Decoration");
-
   if (priv->client_decorated &&
       priv->decorated &&
       !priv->fullscreen &&
@@ -9480,8 +9475,6 @@ gtk_window_snapshot (GtkWidget   *widget,
     }
 
   gtk_debug_updates_snapshot (widget, snapshot);
-
-  gtk_snapshot_pop (snapshot);
 }
 
 /**